/*
* Copyright 2010 Dovado FZ-LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*       http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#import <UIKit/UIKit.h>
#import "LoginViewController.h"
#import "AboutNavigationController.h"
#import <MapKit/MapKit.h> // for CLLocationCoordinate2D

typedef enum {
	ROUTER_UMR = 0,
	ROUTER_4GR,
	ROUTER_3GN
} dovado_router_t;

@interface DovadoAppDelegate : NSObject <UIApplicationDelegate, UITabBarControllerDelegate> {
    UIWindow *window;
    UITabBarController *tabBarController;
	AboutNavigationController *aboutNavigationController;
	LoginViewController *mLoginViewController;
	UIWebView *aboutRouterWebView;
	UIWebView *aboutClientWebView;
	UIWebView *aboutGeneralWebView;
	UIWebView *aboutLicenseWebView;
	CLLocationCoordinate2D mRouterLocation;
	NSString* mHostAddress;
	NSString* mPassword;
	NSString* mUser;
	NSMutableArray *mAliasArray;
	NSMutableArray *mGroupArray;
	NSMutableArray *mInfoArray;
	dovado_router_t router;
	BOOL justLoggedIn;
}

@property (nonatomic, retain) IBOutlet UIWindow *window;
@property (nonatomic, retain) IBOutlet UITabBarController *tabBarController;
@property (nonatomic, retain) IBOutlet AboutNavigationController *aboutNavigationController;
@property (nonatomic, retain) LoginViewController *mLoginViewController;
@property (nonatomic, retain) UIWebView *aboutRouterWebView;
@property (nonatomic, retain) UIWebView *aboutClientWebView;
@property (nonatomic, retain) UIWebView *aboutGeneralWebView;
@property (nonatomic, retain) UIWebView *aboutLicenseWebView;
@property (nonatomic, readwrite) CLLocationCoordinate2D mRouterLocation;
@property (nonatomic, retain) NSString* mHostAddress;
@property (nonatomic, retain) NSString* mPassword;
@property (nonatomic, retain) NSString* mUser;
@property (nonatomic, retain) NSMutableArray *mAliasArray;
@property (nonatomic, retain) NSMutableArray *mGroupsArray;
@property (nonatomic, retain) NSMutableArray *mInfoArray;
@property (nonatomic, assign) dovado_router_t router;
@property (nonatomic, assign) BOOL justLoggedIn;

- (void) loginButtonClicked;
- (void) storeSharedPrefs;
- (BOOL) extendedFeatures;

@end
